﻿namespace CoreShop.Model
{
    /// <summary>
    /// 统一方法返回值
    /// </summary>
    public class ReturnModel
    {
        /// <summary>
        /// 状态
        /// </summary>
        public ReturnStatus Status { get; set; } = ReturnStatus.Yes;
        /// <summary>
        /// 信息/字符串数据
        /// </summary>
        public string MessageOrString { get; set; } = string.Empty;
        /// <summary>
        /// 数据/实体数据
        /// </summary>
        public object DataOrEntityData { get; set; }
    }

    /// <summary>
    /// 统一返回值状态
    /// </summary>
    public enum ReturnStatus
    {
        /// <summary>
        /// 成功
        /// </summary>
        Success,
        /// <summary>
        /// 失败
        /// </summary>
        Error,
        /// <summary>
        /// 警告
        /// </summary>
        Warn,
        /// <summary>
        /// 是
        /// </summary>
        Yes,
        /// <summary>
        /// 否
        /// </summary>
        No
    }
}
